<template>
  <span>
    <el-button round size="mini" @click="dialogPhoneMethods">修改</el-button>
    <el-dialog title="收货地址" :visible.sync="dialogPhone" center>
      <div slot="title" class="header-title">
        <img src="../assets/pic@2x/shouji@2x.png" alt>
        <div style="font-weight:300;color:rgba(0,0,0)">手机号修改</div>
      </div>
      <el-form :model="form">
        <el-form-item label="原手机验证码" :label-width="formLabelWidth">
          <el-input
            v-model="form.name"
            autocomplete="off"
            placeholder="请输入手机验证码"
            :class="{phoneCheck:true}"
          ></el-input>
          <el-button :class="{getCheck:true}">获取验证码</el-button>
        </el-form-item>
        <el-form-item label="手机号码" :label-width="formLabelWidth">
          <el-input v-model="form.name" autocomplete="off" placeholder="请输入手机号"></el-input>
        </el-form-item>
        <el-form-item label="手机验证码" :label-width="formLabelWidth">
          <el-input
            v-model="form.name"
            autocomplete="off"
            placeholder="请输入手机验证码"
            :class="{phoneCheck:true}"
          ></el-input>
          <el-button :class="{getCheck:true}">获取验证码</el-button>
        </el-form-item>
      </el-form>
      <div slot="footer" class="dialog-footer" style="height:100px;">
        <el-button type="primary" @click="dialogPhoneMethods" style="float:none;width:50%">确 定</el-button>
      </div>
    </el-dialog>
  </span>
</template>
<script>
export default {
  data() {
    return {
      dialogPhone: false,
      form: {
        name: ""
      },
      formLabelWidth: "120px"
    };
  },
  methods: {
    dialogPhoneMethods() {
      this.dialogPhone = !this.dialogPhone;
       if (this.dialogPhone == true) {
        console.log("打开手机弹出框触发的事件");
      } else {
        console.log("关闭手机弹出框触发的事件");
      }
    }
  }
};
</script>
<style lang="less" scoped>
.phoneCheck {
  width: 70%;
}
/deep/.el-input__inner {
  background-color: rgba(238, 238, 238, 1);
}
p {
  padding-left: 70px;
  .el-button {
    float: right;
    margin: 20px 30px 0 0;
    background: #171c61;
    color: #fff;
  }
  .getCheck {
    width: 30%;
    position: absolute;
    margin: 0;
    float: none;
    background: rgba(238, 238, 238, 1);
    color: #171c61;
  }
}
</style>
